package com.erp.gis.idl;

import java.util.Vector;
import java.util.Map;

import com.paipai.lang.uint16_t;
import com.paipai.lang.uint32_t;
import com.paipai.lang.uint64_t;
import com.paipai.lang.uint8_t;
import com.paipai.util.annotation.ApiProtocol;
import com.paipai.util.annotation.Field;
import com.paipai.util.annotation.HeadApiProtocol;
import com.paipai.util.annotation.Member;

@HeadApiProtocol(cPlusNamespace = "erp::gis::ao", needInit = true, needReset = true)
public class GisCoreAo {
    @Member(desc = "配送方式GIS确认信息PO", cPlusNamespace = "erp::gis::po", isNeedUFlag = true, isNeedTempVersion = true)
    public class ShipTypeAreaGisCheckPo {
        @Field(desc = " 版本号 ", defaultValue = "0")
        uint32_t version;
        uint8_t version_u;
		
		@Field(desc = "配送方式 列表")
        Vector<uint32_t> shipType;
        uint8_t shipType_u;
		
		@Field(desc = "送达地的国标市区域ID ")
        uint32_t destGbCityId;
        uint8_t destGbCityId_u;

		@Field(desc = "送达地的国标省ID ")
        uint32_t destGbProvinceId;
        uint8_t destGbProvinceId_u;

        @Field(desc = "送达地省份,仅支持UTF8格式输入")
        String destAddrProvince;
        uint8_t destAddrProvince_u;
        
        @Field(desc = "送达地市,仅支持UTF8格式输入")
        String destAddrCity;
        uint8_t destAddrCity_u;
        
        @Field(desc = "送达地区,仅支持UTF8格式输入")
        String destAddrDistrict;
        uint8_t destAddrDistrict_u;
        
        @Field(desc = "送达地的详细地址(不包括省市区),仅支持UTF8格式输入")
        String destAddrText;
        uint8_t destAddrText_u;
		
		@Field(desc = "预留扩展字段 ")
        String reserve;
        uint8_t reserve_u;
    }
	
	@Member(desc = "合并经后的纬度PO", cPlusNamespace = "erp::gis::po", isNeedUFlag = true, isNeedTempVersion = true)
    public class MergedCoordinatesPo {
        @Field(desc = " 版本号 ", defaultValue = "0")
        uint32_t version;
        uint8_t version_u;
		
		@Field(desc = "经度坐标  x轴")
        String xPoint;
        uint8_t xPoint_u;

        @Field(desc = "维度坐标  y轴")
        String yPoint;
        uint8_t yPoint_u;
		
		@Field(desc = "信任级别" )
        uint32_t trustLevel;
        uint8_t trustLevel_u;
		
		@Field(desc = "预留扩展字段 ")
        String reserve;
        uint8_t reserve_u;
    }
   
    @ApiProtocol(cmdid = "0xc0221001L", desc = "检测目标地址对应的配送方式是否被覆盖 ")
	class CheckAreaCover {
		@ApiProtocol(cmdid = "0xc0221001L", desc = "检测目标地址对应的配送方式是否被覆盖请求类 ")
		class Req {
			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
			String machineKey;

			@Field(desc = "调用来源文件名称，必填")
			String source;

			@Field(desc = "场景id，必填（目前填0即可）")
			uint32_t sceneId;

			@Field(desc = "配送方式信息确认PO")
			ShipTypeAreaGisCheckPo shipTypeAreaGisCheckPo;

			@Field(desc = "请求保留字段")
			String inReserve;
		}

		@ApiProtocol(cmdid = "0xc0228001L", desc = "检测目标地址对应的配送方式是否被覆盖返回类 ")
		class Resp {
			@Field(desc = "配送方式是否可达结果信息, key 配送方式； value 结果  其中 1：代表可配送，0：代表不可配送")
			Map<uint32_t,uint32_t> CheckResult;
			
			@Field(desc = "错误信息")
			String errMsg;

			@Field(desc = "请求保留字段")
			String outReserve;
		}
    }

	@ApiProtocol(cmdid = "0xc0221002L", desc = "获取合并经纬度 ")
	class GetMergeCoordinate {
		@ApiProtocol(cmdid = "0xc0221002L", desc = "获取合并经纬度请求类 ")
		class Req {
			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
			String machineKey;

			@Field(desc = "调用来源文件名称，必填")
			String source;

			@Field(desc = "场景id，必填（目前填0即可）")
			uint32_t sceneId;

			@Field(desc = "送达地省份,仅支持UTF8格式输入")
	        String destAddrProvince;
	        
	        @Field(desc = "送达地市,仅支持UTF8格式输入, 必填")
	        String destAddrCity;
	        
	        @Field(desc = "送达地区,仅支持UTF8格式输入")
	        String destAddrDistrict;
	        
	        @Field(desc = "送达地的详细地址(不包括省市区),仅支持UTF8格式输入, 必填")
	        String destAddrText;

			@Field(desc = "请求保留字段")
			String inReserve;
		}

		@ApiProtocol(cmdid = "0xc0228002L", desc = "获取合并经纬度返回类 ")
		class Resp {
			@Field(desc = "合并后的经纬度信息 ")
			MergedCoordinatesPo mergedCoordinatesPo;
			
			@Field(desc = "错误信息")
			String errMsg;

			@Field(desc = "请求保留字段")
			String outReserve;
		}
    }
}
